#ifndef _APP_CONFIG_H
#define _APP_CONFIG_H

#include <clock_device.h>
#include <pwm_device.h>
#include <appConfig.h>
/******************************************************************/
//
//工程配置文件
//
/******************************************************************/

#define NULL           0       /* 0L if pointer same as long */

#define MAIN_CPU_CLOCK          16       //MHz

#if MAIN_CPU_CLOCK == 16
    #define SYS_MAIN_CLOCK_DIV    CLOCK_DIV_1
#elif MAIN_CPU_CLOCK == 8
    #define SYS_MAIN_CLOCK_DIV    CLOCK_DIV_2
#elif MAIN_CPU_CLOCK == 4
    #define SYS_MAIN_CLOCK_DIV    CLOCK_DIV_4
#elif MAIN_CPU_CLOCK == 2
    #define SYS_MAIN_CLOCK_DIV    CLOCK_DIV_8
#endif

#define LED0_BLUE   PWM_CHANNEL_0
#define LED0_RED    PWM_CHANNEL_1
#define LED0_GREEN  PWM_CHANNEL_2

#define LED1_BLUE   PWM_CHANNEL_3
#define LED1_RED    PWM_CHANNEL_4
#define LED1_GREEN  PWM_CHANNEL_5

#define LED2_BLUE   PWM_CHANNEL_9
#define LED2_RED    PWM_CHANNEL_10
#define LED2_GREEN  PWM_CHANNEL_11

#define LED3_BLUE   PWM_CHANNEL_12
#define LED3_RED    PWM_CHANNEL_13
#define LED3_GREEN  PWM_CHANNEL_14

#define LED4_BLUE   PWM_CHANNEL_15
#define LED4_RED    PWM_CHANNEL_16
#define LED4_GREEN  PWM_CHANNEL_17

#define LED5_BLUE   PWM_CHANNEL_21
#define LED5_RED    PWM_CHANNEL_22
#define LED5_GREEN  PWM_CHANNEL_23

#define LED_MAX_NUM     6       //1-6

#define PN_VOLT_DETECT_START_DUTY       300
#define PWM_VALUE_MAX                   0xFFFF

#define LIN_MASTER_EN    0      //是否使能LIN主机

typedef enum{
  LED0 = 0,
  LED1,
  LED2,
  LED3,
  LED4,
  LED5,
}LedNumber_t;

#define ROOM_TEMPERATURE   250  //0.1C

#define CODE_DEBUG_EN    0

#if CODE_DEBUG_EN == 1
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>

  #define DEBUG_OUT printf

#else

  #define DEBUG_OUT(...)

#endif



#endif